
//如果用uni请求
import http from '@/common/uni.interface.js';

//如果是用uview请求,就用下面这句
//const http = uni.$u.http


//获取用户信息
export function getUserInfo(params){
	return http.get('api/userinfo', params)
}

//用户登录
export function userLogin(params){
	return http.post('/index/user/newlogin', params)
}

//注册
export function newregister(params){
	return http.post('/index/user/newregister', params)
}
// 获取订单列表
export function getOrderList(params){
	return http.get('/index/orders/index', params)
}

// 获取订单详情
export function getOrderDetails(params){
	return http.get('/index/orders/details/order_id', params)
}

// 添加订单
export function addOrders(params){
	return http.post('/index/orders/add', params)
}

// 编辑订单
export function editOrders(params){
	return http.post('/index/orders/edit', params)
}
// 删除订单
export function delOrders(params){
	return http.post('/index/orders/delete', params)
}


 //更改配置项，阻止loading提示
// export function getUserInfo(params){
// 	return http.post('api/login', {custom:{ShowLoading:false}})
// }
